<?php

namespace common\models\pdd;

use common\models\base\ActiveRecord;
use Yii;

/**
 * This is the model class for table "tb_sync_log".
 *
 * @property int $id
 * @property int $uid 会员id
 * @property int $mall_id 店铺id
 * @property string $batch_name 同步记录名称
 * @property int $sync_type 同步类型，1：商品同步
 * @property int $total_cnt 需要同步的数量
 * @property int $status 1：同步中，2：同步结束
 * @property int $suc_cnt 成功同步
 * @property int $err_cnt 失败同步
 * @property string $remark 备注信息
 * @property int $sync_at 同步时间
 */
class PddBatchSyncLog extends ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'pdd_batch_logs';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['uid', 'tpl_id', 'total_cnt', 'success_cnt', 'fail_cnt', 'filter_cnt', 'status', 'created_at', 'updated_at', 'source_type', 'mall_id', 'previewGoodsCount','isonsale','autooffline','countryId','countryType','template_id','delivery_type','buy_limit','order_limit','customer_num','is_folt','is_refundable','shipment_limit_second','second_hand','presale','newprice','inputMultiplierPrice','inputAddPrice','inputSubPrice','inputLastMultiplierPrice','priceTail'], 'integer'],
            [['batch_name', 'batchType', 'contentType', 'inputPrefix', 'inputSuffix', 'deleteTitleOverLengthSource', 'deleteTitleOverLengthPos','presaledate','priceRounding'], 'string', 'max' => 100],
            [['ids', 'inputSearch', 'inputReplace','inputNewContent','filterKeyword','replacePrefix','replaceSuffix','replaceSuffix','editGoodsJson','delGoodsJson'], 'string'],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'ids' => '商品id数组',
            'source_type' => '记录类型 1：上货记录，2：上云库记录',
            'batch_name' => '批次名称',
            'batchType' => '修改类型title：标题',
            'contentType' => '类型add：新增',
            'inputPrefix' => '前缀内容',
            'inputSuffix' => '后缀内容',
            'inputReplace' => '替换词',
            'inputSearch' => '搜索词',
            'deleteTitleOverLengthSource' => '删除源newTitle:新标题 oldTitle:旧标题',
            'deleteTitleOverLengthPos' => '删除位置prefix:前面 suffix:后面',
            'uid' => '用户ID',
            'mall_id' => '店铺ID',
            'tpl_id' => '参数模板ID',
            'total_cnt' => '任务数量',
            'success_cnt' => '成功数量',
            'fail_cnt' => '失败数量',
            'filter_cnt' => '过滤数量',
            'status' => '状态：0复制中，1.复制结束',
            'created_at' => '创建时间',
            'updated_at' => '更新时间',
        ];
    }
}
